package cn.iocoder.yudao.module.of.dal.mysql.meetingminutes;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.of.dal.dataobject.meetingminutes.MeetingMinutesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.of.controller.admin.meetingminutes.vo.*;

/**
 * 会议纪要 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface MeetingMinutesMapper extends BaseMapperX<MeetingMinutesDO> {

    default PageResult<MeetingMinutesDO> selectPage(MeetingMinutesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MeetingMinutesDO>()
                .eqIfPresent(MeetingMinutesDO::getMeetingId, reqVO.getMeetingId())
                .eqIfPresent(MeetingMinutesDO::getMinuteAttach, reqVO.getMinuteAttach())
                .eqIfPresent(MeetingMinutesDO::getMainRespDeptId, reqVO.getMainRespDeptId())
                .likeIfPresent(MeetingMinutesDO::getMainRespDeptName, reqVO.getMainRespDeptName())
                .eqIfPresent(MeetingMinutesDO::getMainRespUserId, reqVO.getMainRespUserId())
                .eqIfPresent(MeetingMinutesDO::getTaskGenUserId, reqVO.getTaskGenUserId())
                .likeIfPresent(MeetingMinutesDO::getTaskGenUserName, reqVO.getTaskGenUserName())
                .betweenIfPresent(MeetingMinutesDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MeetingMinutesDO::getId));
    }

}